package com.springStudy.com.aopStudy;

import com.springStudy.com.aopStudy.staticProxy.StaticProxyCalculator;

public class UseAop {

    public static void main(String[] args) {

        // 房东，目标
        Calculator target = new CalculatorPureImpl();

        // 中介，代理
        Calculator proxy = new StaticProxyCalculator(target);

        int a = 1, b = 2;

        int add = proxy.add(a, b);

        System.out.println(a + " + " + b + " = " + add);

    }
}
